<div class="container">
    <div class="conditions">
     [@b.form name="search_indexbase_form" action="!indexbases"]
        [#list Parameters?keys as k]
          [#if k != "_"]
          <input type="hidden" name="${k}" value="${Parameters[k]}"/>
          [/#if]
        [/#list]
      [/@]
      <div class="total">共检索到${indexbases.totalItems}条记录</div>
      <div class="panel-group" aria-multiselectable="true">
      
        <div class="panel panel-default">
          <div class="panel-heading" role="tab">
            <a role="button" class="panel-title" data-toggle="collapse" href="#indexBaseCollapseOne">时间<i class="pull-right fa fa-angle-down"></i></a>
          </div>
          
          
          <div id="indexBaseCollapseOne" class="panel-collapse collapse in" role="tabpanel">
            <div class="panel-body">
              <ul class="list-unstyled">
                [#list yearStats! as yearStat]
                <li class="condition">
                                  <a href="javascript:void(0)" onclick="searchByDimentions(document.search_indexbase_form,'begin=${yearStat[0]}&end=${yearStat[0]}')">
                    ${yearStat[0]}年<span>(${yearStat[1]})</span>
                   </a>
                   [#if (Parameters['begin']!"") == yearStat[0]?string]<a href="javascript:void(0)" onclick="searchByDimentions(document.search_indexbase_form,'begin=&end=')">X</a>[/#if]
                </li>
                [/#list]
                
                
                <li>
                  <form class="form-inline" name="search_indexbase_by_year_form" action="${b.url('!indexbases')}" method="post">
                    <div class="form-group">
                      <input type="text" class="form-control year" name="begin" value="">
                    </div>
                    <div class="form-group">
                      <span>-</span>
                    </div>
                    <div class="form-group">
                      <input type="text" class="form-control year" name="end" value="">
                    </div>
                    <button type="submit" class="btn btn-default" onclick="bg.form.submit(this.form)">确定</button>
                  </form>
                </li>
                
                
                
              </ul>
            </div>
          </div>
        </div>
        
                <div class="panel panel-default">
          <div class="panel-heading" role="tab">
            <a role="button" class="panel-title" data-toggle="collapse" href="#indexBaseCollapseThree">项目类型<i class="pull-right fa fa-angle-down"></i></a>
          </div>
          <div id="indexBaseCollapseThree" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo">
            <div class="panel-body">
              <ul class="list-unstyled">
              
                [#list projectTypeStats as projectTypeStat]
              
                <li>
                 <a href="javascript:void(0)" onclick="searchByDimentions(document.search_indexbase_form,'projecttype=${projectTypeStat[0]}')">
                   ${projectTypeStat[0]}<span>(${projectTypeStat[1]})</span>
                 </a>
            [#if (Parameters['projecttype']!"") == projectTypeStat[0]]<a href="javascript:void(0)" onclick="searchByDimentions(document.search_indexbase_form,'projecttype=')">X</a>[/#if]
               
                </li>
                [/#list]
                
              </ul>
            </div>
          </div>
        </div>
        
        
        <div class="panel panel-default">
          <div class="panel-heading" role="tab">
            <a role="button" class="panel-title" data-toggle="collapse" href="#indexBaseCollapseTwo">行业<i class="pull-right fa fa-angle-down"></i></a>
          </div>
          <div id="indexBaseCollapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo">
            <div class="panel-body">
             <ul class="list-unstyled">
             
             
                [#list industryStats?sort_by("1")?reverse as k]
                [#if k_index>4]
                [#break/]
                [#else]
                
                <li>${k["0"]}<span>(${k["1"]})</span></li>
                
                [/#if]
                [/#list]
                
                
                [#if industryStats?size>5]<li>更多...</li>[/#if]
              </ul>
            </div>
          </div>
        </div>
        
                

       
      </div>
    </div>
    
    <div class="main">
          <div class="container-fluid">
            <div class="pagebar row">
              [@b.form action="!indexbases" name="search_in_result_indexbaseform"]
              <div class="col-xs-2 sort-control">
                <select class="form-control">
                  <option>默认排序</option>
               
                </select>
              </div>
              <div class="col-xs-2 field-filter">
                <input type="text" class="form-control" placeholder="项目名称" name="indexbase.name" value="${Parameters['indexbase.name']!}">
              </div>
              <div class="col-xs-2 field-filter">
                <input type="text" class="form-control" placeholder="所在区域" name="indexbase.division.name" value="${Parameters['indexbase.division.name']!}">
              </div>
              <div class="col-xs-2 field-filter">
                <input type="text" class="form-control" placeholder="指标类型" name="indexbase.indextype.name" value="${Parameters['indexbase.indextype.name']!}">
              </div>
              <div class="col-xs-2 field-filter">
               <input type="text" class="form-control" placeholder="关键词" name="indexbase.keyword" value="${Parameters['indexbase.keyword']!}">
              </div>
              <div class="pull-right">
                 
              
                <button type="submit" onclick ="bg.form.submit(this.form)" class="btn btn-default"><i class="fa fa-search"></i> 在结果中搜索</button>
                
             
                
                
                
              </div>
              [/@]
            </div>
          </div>
          <ol class="list-unstyled">
            [#list indexbases as indexbase] 
            <li class="row">
              <h5>
                <span class="index-no"></span>
                <span class="label label-primary">阅读全文</span>
                [@b.a href="!indexbaseInfo?id="+indexbase.id class="title"]${indexbase.name!}[/@]
                <span>(被引用 1 次)</span>
              </h5>
              <div class="col-xs-10 col-md-11 info-content">
                <div class="author">
                  <a href="#">${indexbase.indextype.name!}</a> / <a href="#">${indexbase.division.name!}</a>  /  <a href="#">${indexbase.year!}</a> /<a href="#">${indexbase.industry.name!}</a> / <a href="#">${indexbase.budget.name!}</a> / 
                  <a href="#">${indexbase.projecttype.name!}</a>   
                  
                </div>
               
              </div>
              <div class="pull-right action-bar">
                <ul class="list-unstyled">
                  <li><a href="#" class="text-info"><i class="fa fa-download"></i>下载</a></li>
                  <li><a href="#" class="text-info"><i class="fa fa-file-text-o"></i>
      				[@b.a target="_blank" href="!viewIndexBase?id=${indexbase.id}"] 阅读[/@]
      			
                  </a></li>
                 
                </ul>
              </div>
             
            </li>
            [/#list]
          </ol>
          <div class="pagination-bar row">
            [#assign currentPageIndex=indexbases.pageIndex/]
            [#assign totalPageIndex=indexbases.totalPages/]
            <ul class="pagination">
              <li>[@b.a href="!indexbases?pageIndex=1"]首页[/@]</li>
              [#if currentPageIndex>1]
              <li>[@b.a href="!indexbases?pageIndex=" +(currentPageIndex-1)]上一页[/@]</li>
              [/#if]
              [#list currentPageIndex-3 .. currentPageIndex-1 as i]
              [#if i>0]
              <li>[@b.a href="!indexbases?pageIndex=" +(i)]${i}[/@]</li>
              [#else] [#break/]
              [/#if]
              [/#list]
              <li class="active"><a href="#">${currentPageIndex}</a></li>
              [#list currentPageIndex+1 .. currentPageIndex+3 as i]
              [#if i<=totalPageIndex]
              <li>[@b.a href="!indexbases?pageIndex=" +(i)]${i}[/@]</li>
              [#else] [#break/]
              [/#if]
              [/#list]
              [#if currentPageIndex<totalPageIndex]
              <li>[@b.a href="!indexbases?pageIndex=" +(currentPageIndex+1)]下一页[/@]</li>
              [/#if]
              <li>[@b.a href="!indexbases?pageIndex="+totalPageIndex]尾页[/@]</li>
            </ul>
          </div>
      </div>
    </div>
  </div>

</div> <!--end container-->
